
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/template/main.xhtml">

	<ui:define name="body">
		<h:form prependId="false">
			<p:fieldset legend="#{messages['turmaaddtutor.label']}"
				toggleable="true" toggleSpeed="500">
				<h:panelGrid id="fields" columns="3">

					<h:outputLabel value="#{messages['turma.label.id']}: " for="id"
						styleClass="text-input" />
					<h:outputText id="id" value="#{turmaAddTutorMB.turma.id}" />
					<p:message for="id" />

					<h:outputLabel value="#{messages['turma.label.codigo']}: "
						for="codigo" styleClass="text-input" />
					<h:outputText id="codigo" value="#{turmaAddTutorMB.turma.codigo}" />
					<p:message for="codigo" />

					<h:outputLabel value="#{messages['turma.label.curso']}: "
						for="curso" styleClass="text-input" />
					<h:outputText id="curso" value="#{turmaAddTutorMB.turma.curso}" />
					<p:message for="curso" />

					<h:outputLabel value="#{messages['turma.label.tutores']}: "
						for="tutores" styleClass="text-input" />
					<h:selectManyListbox id="tutores"
						value="#{turmaAddTutorMB.tutoresSel}"
						style="height:100px; width:200px;" converter="tutorConverter"
						required="true">
						<f:selectItems value="#{turmaAddTutorMB.tutores}" var="tutor"
							itemValue="#{tutor}" itemLabel="#{tutor.usuario.nome}" />
					</h:selectManyListbox>
					<p:message for="tutores" />

				</h:panelGrid>
			</p:fieldset>
			<br />
			<p:toolbar>
				<p:toolbarGroup align="left">
					<p:commandButton value="#{messages['button.save']}"
						action="#{turmaAddTutorMB.salve()}" ajax="false" />

					<p:button value="#{messages['button.back']}" outcome="turma_list" />
				</p:toolbarGroup>
			</p:toolbar>

		</h:form>

		<script type="text/javascript">
	      	$(document).ready(function() {
		    	$('#tutores').focus();
			});
	    </script>


	</ui:define>
</ui:composition>